const HarImageExtractor = require('../utils/HarImageExtractor');

const parseHarFileFn = async (event, config, mainWindow) => {
  try {
    // 创建HAR图片提取器实例
    const extractor = new HarImageExtractor(config);
    
    // 执行提取
    const result = await extractor.extractImages(mainWindow);
    return result;
  } catch (error) {
    console.error('解析HAR文件失败:', error);
    throw error;
  }
};

module.exports = {
  parseHarFileFn
};